﻿<%@ Control Language="C#" %>
<%@ Register Assembly="TunyNet.Web.UI" Namespace="TunyNet.Web.UI" TagPrefix="Tunynet" %>
<%@ Register Assembly="ChinaCustoms.Qingdao.Workflow.Controls" Namespace="ChinaCustoms.Qingdao.Workflow.Controls"
    TagPrefix="WFU" %>

<script language="javascript" type="text/javascript">
<!--
    function getNextActivityExecutor(result)
    {
	    if (result != null)
	    {
		    arr = result.split("|");
		    document.getElementById('<%= NextActivityExecutorLabel.ClientID %>').innerHTML = arr[0];
		    document.getElementById('<%= NextActivityExecutorHidden.ClientID %>').value = arr[1];
	    }
    }
    
    function getOrganizationsOfSubFlow(result)
    {
	    if (result != null)
	    {
		    arr = result.split("|");
		    document.getElementById('<%= SubFlowOrganizationsLabel.ClientID %>').innerHTML = arr[0];
		    document.getElementById('<%= SubFlowOrganizationsHidden.ClientID %>').value = arr[1];
	    }
    }

//-->
</script>

<asp:UpdatePanel runat="server" ID="UpdatePanel" UpdateMode="Conditional" ChildrenAsTriggers="true">
    <Triggers>
        <asp:PostBackTrigger ControlID="SaveButton" />
        <asp:PostBackTrigger ControlID="NextStepButton" />
    </Triggers>
    <ContentTemplate>
        <fieldset runat="server" id="InputPostilBlock" class="workflowInputPostilBlock" visible="false">
            <legend class="workflowInputPostilBlockTitle">录入意见</legend>
            <table>
                <tr>
                    <td valign="top">
                        <span class="workflowLabel">填写意见：</span>
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="Postil" TextMode="MultiLine" Rows="4" CssClass="workflowPostilTextbox" />
                    </td>
                </tr>
            </table>
        </fieldset>
        <fieldset runat="server" id="NextActionSettingBlock" class="workflowNextActionBlock">
            <legend class="workflowNextActionBlockTitle">流转控制</legend>
            <table runat="server" id="NextActionBlock">
                <tr runat="server" id="NextActionSelectArea">
                    <td>
                        <span class="workflowLabel">下个流程：</span>
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="NextActionSelect" CssClass="workflowNextActionDropDownList" />
                    </td>
                </tr>
                <tr runat="server" id="NextActivityExecutorArea" visible="false">
                    <td>
                        <span class="workflowLabel">执&nbsp;&nbsp;行&nbsp;&nbsp;人：</span>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="NextActivityExecutorLabel" />
                        <input type="hidden" id="NextActivityExecutorHidden" runat="server" name="NextActivityExecutorHidden" />
                        <WFU:ModalLink runat="server" ID="NextActivityExecutorLink" Text="选择" DestinationURL="~/Utility/UserSelector.aspx"
                            CallBack="getNextActivityExecutor"></WFU:ModalLink>
                        <asp:CustomValidator runat="server" ID="NextActivityExecutorCustomValidator" ValidationGroup="WorkflowController"
                            ErrorMessage="请选择下一流程的具体执行人" Text="*" />
                    </td>
                </tr>
                <tr runat="server" id="SubFlowOrganizationsArea" visible="false">
                    <td>
                        <span class="workflowLabel">流程分发：</span>
                    </td>
                    <td>
                        <asp:Label runat="server" ID="SubFlowOrganizationsLabel" />
                        <input type="hidden" id="SubFlowOrganizationsHidden" runat="server" name="SubFlowOrganizationsHidden" />
                        <WFU:ModalLink runat="server" ID="SubFlowOrganizationsLink" Text="选择" DestinationURL="~/Utility/OrganizationSelector.aspx"
                            CallBack="getOrganizationsOfSubFlow"></WFU:ModalLink>
                        <asp:CustomValidator runat="server" ID="SubFlowOrganizationsCustomValidator" ErrorMessage="请选择启动子流程的部门"
                            ValidationGroup="WorkflowController" Text="*" />
                    </td>
                </tr>
            </table>
        </fieldset>
        <table runat="server" id="ButtonBlock" class="workflowControllerButtonBlock">
            <tr>
                <td style="width: 70%">
                </td>
                <td style="width: 30%">
                    <asp:LinkButton runat="server" ID="SaveButton" Text="保存" CssClass="workflowControllerButton" />&nbsp;&nbsp;
                    <asp:LinkButton runat="server" ID="NextStepButton" Text="流转" CssClass="workflowControllerButton" />
                </td>
            </tr>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
